From 74680a61ba440855cf2d4c443f005188848e42e8 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Mon, 23 Sep 2013 02:40:24 +0000 Subject: [PATCH] Make unicsv a little more QString ready internally. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4624 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/unicsv.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gpsbabel/unicsv.cc b/gpsbabel/unicsv.cc index 5a9813f4b..9b14ca8e3 100644 --- a/gpsbabel/unicsv.cc +++ b/gpsbabel/unicsv.cc @@ -1293,13 +1293,12 @@ unicsv_print_data_time(const QDateTime& idt) static void unicsv_waypt_enum_cb(const waypoint* wpt) { - const char* shortname; garmin_fs_t* gmsd; - shortname = (wpt->shortname) ? CSTRc(wpt->shortname) : ""; + const QString& shortname = wpt->shortname; gmsd = GMSD_FIND(wpt); - if (*shortname) { + if (!shortname.isEmpty()) { gb_setbit(&unicsv_outp_flags, fld_shortname); } if (wpt->altitude != unknown_alt) { @@ -1308,10 +1307,10 @@ unicsv_waypt_enum_cb(const waypoint* wpt) if (!wpt->icon_descr.isNull()) { gb_setbit(&unicsv_outp_flags, fld_symbol); } - if (wpt->description && *wpt->description && (strcmp(shortname, wpt->description) != 0)) { + if (wpt->description && *wpt->description && shortname != wpt->description) { gb_setbit(&unicsv_outp_flags, fld_description); } - if (wpt->notes && *wpt->notes && (strcmp(shortname, wpt->notes) != 0)) { + if (wpt->notes && *wpt->notes && shortname != wpt->notes) { if ((! wpt->description) || (strcmp(wpt->description, wpt->notes) != 0)) { gb_setbit(&unicsv_outp_flags, fld_notes); } -- 2.30.2